$(document).ready(function(){
    $.backstretch("static/assets/img/backgrounds/1.jpg");
	//登录
	$(".btn").click(function () {
        var flag = false;
	    var userName  = $("#form-username").val();
        var password = $("#form-password").val();
        if (userName == ""){
            $("#form-username").attr("placeholder","请输入用户名");
            $("#form-username").addClass('input-error');
            flag = true;
        }
        if (password == ""){
            $("#form-password").attr("placeholder","请输入密码");
            $("#form-password").addClass('input-error');
            flag = true;
        }
        if(flag){
            return;
        }
        window.location="./zflProduct/list";
    })

    $(".form-control").change(function () {
		if($(this).val() != ""){
			$(this).removeClass("input-error");
		}else{
            $(this).addClass("input-error");
		}
    })
});







